/*
 Navicat MySQL Data Transfer

 Source Server         : localhost
 Source Server Version : 50513
 Source Host           : localhost
 Source Database       : ng

 Target Server Version : 50513
 File Encoding         : utf-8

 Date: 07/13/2011 21:58:23 PM
*/

SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
--  Table structure for `real_estate_listing`
-- ----------------------------
DROP TABLE IF EXISTS `real_estate_listing`;
CREATE TABLE `real_estate_listing` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `street_id` int(11) NOT NULL,
  `street_number` varchar(20) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `type` smallint(6) NOT NULL,
  `bedroom` smallint(6) NOT NULL,
  `ensuite` smallint(6) NOT NULL,
  `bathroom` smallint(6) NOT NULL,
  `car_space` smallint(6) NOT NULL,
  `land_area` int(11) NOT NULL,
  `floor_area` int(11) NOT NULL,
  `primary_use` smallint(6) NOT NULL,
  `days_on_the_market` smallint(6) NOT NULL,
  `listing_start_date` date NOT NULL,
  `start_listing_price` decimal(9,2) NOT NULL,
  `current_listing_price` decimal(9,2) NOT NULL,
  `current_price_description` varchar(255) NOT NULL,
  `agency_name` varchar(255) NOT NULL,
  `agent_name` varchar(255) NOT NULL,
  `current_listing_date` date NOT NULL,
  `current_listing_type` varchar(50) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `slug` (`slug`),
  KEY `real_estate_listing_539ecf1b` (`street_id`),
  CONSTRAINT `street_id_refs_id_a971d81c` FOREIGN KEY (`street_id`) REFERENCES `location_street` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `real_estate_listing`
-- ----------------------------
BEGIN;
INSERT INTO `real_estate_listing` VALUES
('1', '1', '1', '1', '0', '4', '2', '2', '2', '430', '300', '0', '30', '2010-11-10', '550000.00', '535000.00', 'Price dropped.', 'LJ Hooker', 'anne', '2010-11-25', '1'),
('2', '1', '10/8', '2', '1', '3', '1', '2', '1', '180', '180', '0', '40', '2010-07-24', '410000.00', '395000.00', 'Contract crashed.', 'Ray White', 'jack', '2010-08-08', '2'),
('3', '1', '7/8', '3', '1', '3', '1', '2', '1', '150', '180', '0', '98', '2010-05-09', '398000.00', '383000.00', 'Good rental return.', 'Ray White', 'jack', '2010-05-24', '2'),
('4', '1', '12/8', '4', '1', '3', '1', '2', '1', '165', '180', '0', '23', '2010-06-16', '405000.00', '390000.00', 'Price dropped.', 'LJ Hooker', 'anne', '2010-07-01', '2'),
('5', '1', '10', '5', '0', '4', '2', '4', '2', '530', '350', '0', '87', '2010-08-16', '660000.00', '645000.00', 'Contract crashed.', 'Yong', 'sam', '2010-08-31', '1'),
('6', '1', '6', '6', '0', '5', '3', '4', '3', '680', '400', '0', '52', '2010-08-19', '690000.00', '675000.00', 'Good rental return.', 'Yong', 'sam', '2010-09-03', '1'),
('7', '1', '4', '7', '0', '4', '2', '3', '2', '600', '320', '0', '23', '2010-05-13', '800000.00', '785000.00', 'Price dropped.', 'Yong', 'sam', '2010-05-28', '1'),
('8', '2', '104', '8', '2', '0', '0', '2', '5', '200', '200', '1', '98', '2010-01-26', '570000.00', '555000.00', 'Contract crashed.', 'Yong', 'sam', '2010-02-10', '1'),
('9', '2', '150', '9', '2', '0', '0', '2', '6', '300', '300', '1', '67', '2010-02-13', '650000.00', '635000.00', 'Contract crashed.', 'LJ Hooker', 'anne', '2010-02-28', '1'),
('10', '2', '400', '10', '2', '0', '0', '2', '5', '270', '370', '1', '47', '2010-02-11', '910000.00', '895000.00', 'Price dropped.', 'LJ Hooker', 'anne', '2010-02-26', '1'),
('11', '2', '250', '11', '3', '0', '0', '2', '6', '400', '400', '1', '50', '2010-01-08', '1022000.00', '1007000.00', 'Good rental return.', 'Ray White', 'jack', '2010-01-23', '2'),
('12', '2', '280', '12', '3', '0', '0', '2', '8', '500', '500', '1', '42', '2009-12-07', '1320000.00', '1305000.00', 'Good rental return.', 'Ray White', 'jack', '2009-12-22', '2'),
('13', '2', '283', '13', '3', '0', '0', '2', '6', '500', '500', '1', '19', '2009-11-13', '600000.00', '585000.00', 'Good rental return.', 'Ray White', 'jack', '2009-11-28', '1'),
('14', '2', '264', '14', '3', '0', '0', '2', '4', '300', '300', '1', '10', '2009-10-24', '800000.00', '785000.00', 'Price dropped.', 'Ray White', 'jack', '2009-11-08', '1'),
('15', '3', '97', '15', '0', '4', '2', '3', '2', '540', '420', '0', '39', '2009-08-30', '500000.00', '485000.00', 'Be quick, it will sold soon', 'LJ Hooker', 'paul', '2009-09-14', '1'),
('16', '3', '96', '16', '0', '4', '2', '3', '2', '700', '480', '0', '40', '2009-08-08', '610000.00', '595000.00', 'Good rental return.', 'LJ Hooker', 'paul', '2009-08-23', '1'),
('17', '3', '94', '17', '0', '5', '3', '4', '2', '800', '460', '0', '50', '2009-06-27', '650000.00', '635000.00', 'Good rental return.', 'LJ Hooker', 'paul', '2009-07-12', '1'),
('18', '3', '93', '18', '0', '5', '3', '3', '3', '890', '520', '0', '72', '2009-04-28', '530000.00', '515000.00', 'Be quick, it will sold soon', 'LJ Hooker', 'paul', '2009-05-13', '2'),
('19', '3', '88', '19', '0', '6', '4', '4', '3', '1200', '600', '0', '92', '2009-03-23', '920000.00', '905000.00', 'Price dropped.', 'Ray White', 'jack', '2009-04-07', '2'),
('20', '3', '83', '20', '5', '0', '0', '0', '0', '1500', '0', '4', '32', '2009-04-10', '730000.00', '715000.00', 'Good rental return.', 'Yong', 'sam', '2009-04-25', '2'),
('21', '3', '85', '21', '7', '0', '0', '0', '0', '1009', '0', '4', '12', '2009-03-30', '900000.00', '885000.00', 'Good rental return.', 'LJ Hooker', 'anne', '2009-04-14', '1');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
